<!DOCTYPE html>
<!-- saved from url=(0052)http://getbootstrap.com/docs/4.0/examples/dashboard/ -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Dashboard Template for Bootstrap</title>
    <!-- Bootstrap core CSS -->
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link th:href="@{/css/dashboard.css}" rel="stylesheet">
    <style type="text/css">
        /* Chart.js */

        @-webkit-keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

        @keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

        .chartjs-render-monitor {
            -webkit-animation: chartjs-render-animation 0.001s;
            animation: chartjs-render-animation 0.001s;
        }

        a.disabled {
            pointer-events: none;
            filter: alpha(opacity=50); /*IE滤镜，透明度50%*/
            -moz-opacity: 0.5; /*Firefox私有，透明度50%*/
            opacity: 0.5; /*其他，透明度50%*/
        }
    </style>
</head>

<body>
<div th:replace="~{/commons/common::headBar}"></div>

<div class="container-fluid">
    <div class="row">
        <div th:replace="~{/commons/common::sideBar(active='exam.html')}"></div>

        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
            <h2>试卷列表</h2>
            <div class="table-responsive">
                <table class="table table-striped table-sm">
                    <thead>
                    <tr>
                        <th>考试名称</th>
                        <th>指定班级</th>
                        <th>开始时间</th>
                        <th>结束时间</th>
                        <th>考试时长</th>
                        <th>总分</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr th:each="exam:${examList}">
                        <td th:text="${exam.getTitle()}"></td>
                        <td th:text="${exam.getClassName()}"></td>
                        <td th:text="${#dates.format(exam.getStartTime(),'yyyy-MM-dd HH:mm')}"></td>
                        <td th:text="${#dates.format(exam.getEndTime(),'yyyy-MM-dd HH:mm')}"></td>
                        <td th:text="${exam.getTotalTime()}+'分钟'"></td>
                        <td th:text="${exam.getTotalScore()}"></td>
                        <td>
                            <a class="btn btn-sm btn-primary" th:href="@{/test/}+${exam.getId()}">去考试</a>
                            <a class="btn btn-sm btn-warning" th:href="@{/test/show/}+${exam.getId()}+'/'+${session.loginUser}">查看成绩</a>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </main>
    </div>
</div>

<!-- Bootstrap core JavaScript
================================================== -->

<script src="https://s3.pstatp.com/cdn/expire-1-M/jquery/3.2.1/jquery.min.js"></script>
<!--<script type="text/javascript" th:src="@{/js/jquery-3.2.1.slim.min.js}"></script>-->
<script type="text/javascript" th:src="@{/js/popper.min.js}"></script>
<script type="text/javascript" th:src="@{/js/bootstrap.min.js}"></script>
<!-- Graphs -->
<script type="text/javascript">
    $(".disabled").attr("disabled",true).css("pointer-events","none");
</script>


</body>

</html>